﻿<Window x:Class="AppDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <StackPanel Orientation="Horizontal">
            <StackPanel Orientation="Vertical">
                <TreeView x:Name="demoTree">
                    <TreeViewItem Header="Validation" IsExpanded="True">
                        <TreeViewItem Header="ValidationBasic" Tag="ValidationSimple/ValidationBasic.xaml" />
                        <TreeViewItem Header="ValidationLifeCycle" Tag="ValidationSimple/ValidationLifeCycleSimple.xaml" />
                        <TreeViewItem Header="TriggerElement" Tag="ValidationSimple/ValidationTriggerElementSimple.xaml" />
                        <TreeViewItem Header="CompareValidator" Tag="ValidationSimple/CompareValidatorSimple.xaml" />
                        <TreeViewItem Header="TypeValidation" Tag="ValidationSimple/TypeValidationSimple.xaml" />
                    </TreeViewItem>
                    <TreeViewItem Header="RegionSimple">
                        <TreeViewItem Header="RegionBasic" Tag="RegionSimple/RegionBasic.xaml"></TreeViewItem>
                    </TreeViewItem>
                    <TreeViewItem Tag="Query/SelectorSimple.xaml" Header="Selector" IsExpanded="True">
                        <TreeViewItem Header="Selectors">
                        </TreeViewItem>
                        <TreeViewItem Header="Traversing">
                            <TreeViewItem Header="Filtering"></TreeViewItem>
                            <TreeViewItem Header="Finding"></TreeViewItem>
                            <TreeViewItem Tag="Query/ChainingSimple.xaml" Header="Chaining"></TreeViewItem>
                        </TreeViewItem>
                        <TreeViewItem Header="Manipulation" IsExpanded="True">
                            <TreeViewItem Tag="Query/InsertingOutsideSimple.xaml" Header="Inserting Inside"></TreeViewItem>
                            <TreeViewItem Header="Inserting Outside"></TreeViewItem>
                            <TreeViewItem Tag="Query/InsertingAroundSimple.xaml" Header="Inserting Around"></TreeViewItem>
                            <TreeViewItem Tag="Query/ReplacingAndRemovingSimple.xaml" Header="ReplacingAndRemoving"></TreeViewItem>

                            <TreeViewItem Header="Copying"></TreeViewItem>
                            <TreeViewItem Tag="Query/appendSimple.xaml" Header="append"></TreeViewItem>
                        </TreeViewItem>
                        <TreeViewItem Header="Attributes"></TreeViewItem>
                        <TreeViewItem Header="Effects"></TreeViewItem>
                    </TreeViewItem>
                    <TreeViewItem IsExpanded="True" Header="Extension Control">
                        <TreeViewItem Tag="ControlDemo/ValidationSimple.xaml" Header="DataGrid"></TreeViewItem>
                        <TreeViewItem Tag="ExtensionControl/DataGridSimple.xaml" Header="DataGrid"></TreeViewItem>
                        <TreeViewItem Header="Calendar"></TreeViewItem>
                        <TreeViewItem Header="DataPicker"></TreeViewItem>
                    </TreeViewItem>
                    <TreeViewItem IsExpanded="True" Header="ItemsControlExtension">
                        <TreeViewItem Tag="ItemsControlExtension/RadioButtonListSimple.xaml" Header="RadioButtonList"></TreeViewItem>
                        <TreeViewItem Tag="ItemsControlExtension/CheckBoxListSimple.xaml" Header="CheckButtonList"></TreeViewItem>

                        <TreeViewItem Tag="ItemsControlExtension/DraggedItemsControlSimple.xaml" Header="DraggedSimple"></TreeViewItem>
                        <TreeViewItem Tag="ControlDemo/MultiSelectSimple.xaml" Header="MultiSelect"></TreeViewItem>
                    </TreeViewItem>
                    <TreeViewItem IsExpanded="True" Header="ContentControlExtension">
                        <TreeViewItem Tag="ContentControl/ZeroSizeContentControlSimple.xaml" Header="ZeroSizeContentControl"></TreeViewItem>
                        <TreeViewItem Tag="ControlDemo/ResizableContentControlSimple.xaml" Header="ResizableContentControl"></TreeViewItem>
                    </TreeViewItem>
                    <TreeViewItem IsExpanded="True" Header="自定义控件(custom control)">
                        <TreeViewItem Tag="ControlDemo/NumericUpDownSimple.xaml" Header="NumericUpDown"></TreeViewItem>
                        <TreeViewItem Tag="ControlDemo/DoubleTextBoxSimple.xaml" Header="DoubleTextBox"></TreeViewItem>
                        <TreeViewItem Tag="ControlDemo/DateUpDownSimple.xaml" Header="DateUpDown"></TreeViewItem>
                        <TreeViewItem Tag="ControlDemo/SplitButtonSimple.xaml" Header="SplitButton"></TreeViewItem>

                        <TreeViewItem Header="SwapListBox"></TreeViewItem>
                    </TreeViewItem>
                    <TreeViewItem IsExpanded="True" Header="自定义面板(custom panel)">
                        <TreeViewItem Header="Box"></TreeViewItem>
                    </TreeViewItem>
                </TreeView>
                <Expander IsExpanded="True"  Margin="0,0,0,10" DockPanel.Dock="top" Background="white" FocusVisualStyle="{x:Null}">
                    <Expander.Header>
                        <TextBlock Margin="10,0,0,0"  FontFamily="Calibri" FontWeight="bold"  TextTrimming="WordEllipsis">Controls</TextBlock>
                    </Expander.Header>
                    <ListBox x:Name="demoList" MaxHeight="400" Style="{DynamicResource SamplesListBox}"  IsSynchronizedWithCurrentItem="True" SelectedValue="X" Width="142" Height="339">
                        <ListBoxItem Tag="ControlDemo/MaskedTextBoxSimple.xaml" Content="MaskedTextBox"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/NumericUpDownSimple.xaml" Content="NumericUpDown"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/DoubleTextBoxSimple.xaml" Content="DoubleTextBox"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/MultiSelectSimple.xaml" Content="MultiSelect"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/MonthCalendarSimple.xaml" Content="MonthCalendar"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/DateUpDownSimple.xaml" Content="DateUpDown"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/DatePickerSimple.xaml" Content="DatePicker"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/SwapListBoxSimple.xaml" Content="SwapListBox"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/DataGridSimple.xaml" Content="DataGrid"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/ValidationSimple.xaml" Content="Validation"></ListBoxItem>
                        <ListBoxItem Tag="PanelDemo/BoxSimple.xaml" Content="Box"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/WatermarkedTextBoxSimple.xaml" Content="WatermarkedTextBox"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/BindingGroupSimple.xaml" Content="BindingGroupSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/ItemsListViewSimple.xaml" Content="ItemsListViewSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/AnimatedExpanderDecoratorSimple.xaml" Content="AnimatedExpanderDecoratorSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/AnimatedExpanderSimple.xaml" Content="AnimatedExpanderSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/ResizableContentControlSimple.xaml" Content="ResizableContentControlSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/PopupButtonSimple.xaml" Content="PopupButtonSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/SwapListBoxSimple.xaml" Content="SwapListBoxSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/DatatemplateSimple.xaml" Content="DatatemplateSimple"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/BitmapImageDemo.xaml" Content="BitmapImageDemo"></ListBoxItem>
                        <ListBoxItem Tag="Composite/CommandDemo.xaml" Content="Command"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/ButtonSpinnerDemp.xaml" Content="ButtonSpinnerDemo"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/TemplateBindingDemo.xaml" Content="TemplateBindingDemo"></ListBoxItem>
                        <ListBoxItem Tag="ControlDemo/ListControl.xaml" Content="ListControlDemo"></ListBoxItem>
                    </ListBox>
                </Expander>
                <Expander Margin="0,0,0,10" DockPanel.Dock="top" Background="white" FocusVisualStyle="{x:Null}">
                    <Expander.Header>
                        <TextBlock Margin="10,0,0,0"  FontFamily="Calibri" FontWeight="bold"  TextTrimming="WordEllipsis">Panel</TextBlock>
                    </Expander.Header>
                    <ListBox MaxHeight="300"  IsSynchronizedWithCurrentItem="True" SelectedValue="X" Width="113">

                    </ListBox>
                </Expander>
            </StackPanel>
            <ScrollViewer VerticalAlignment="Stretch" Height="357" Width="561">
                <Frame Name="myFrame" 
        NavigationUIVisibility="Hidden"
         Source="{Binding SelectedItem.Tag,ElementName=demoList}"
        VerticalAlignment="Stretch" />
            </ScrollViewer>
        </StackPanel>
    </Grid>
</Window>
